package com.yun.newBlog.blog.controller;

import com.yun.newBlog.blog.vo.CommonResponseVo;
import com.yun.newBlog.blog.vo.LoginSuccessResponseVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.userdetails.User;
import org.springframework.social.connect.Connection;
import org.springframework.social.security.SocialAuthenticationToken;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@RestController
@Slf4j
@RequestMapping("/logout")
public class LogoutController {

    /**
     *
     * @return
     */
    @RequestMapping("/succeed")
    public CommonResponseVo logoutSucceed(HttpServletRequest request, HttpServletResponse response){
        CommonResponseVo responseVo = new CommonResponseVo();
        responseVo.setErrNo(0);
        responseVo.setMsg("退出成功");
        return responseVo;
    }
}
